package com.huike.pmps.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huike.pmps.model.entity.CustomerSuccess;
import org.apache.ibatis.annotations.Update;

/**
 * author：张春旺(010101)
 * date: 2021-06-29
 * WeChat:18311488838
 * QQ:347329812
 */
public interface CustomerSuccessDao extends BaseMapper<CustomerSuccess> {
    @Update({
            " UPDATE p_customer_success SET is_deleted = 1  WHERE id = #{teamId} ; ",
    })
    int delByID(Integer teamId);

    @Update({
            " UPDATE p_po                         SET team_name=#{teamName}  WHERE team_id= #{teamId} ; ",
            " UPDATE p_po_course                  SET team_name=#{teamName}  WHERE team_id= #{teamId} ; ",
            " UPDATE p_po_course_supplier_detail  SET team_name=#{teamName}  WHERE team_id= #{teamId} ; ",
            " UPDATE p_supplier_settlement_detail SET team_name=#{teamName}  WHERE team_id= #{teamId} ; ",
            " UPDATE p_supplier_warehouse_receipt SET team_name=#{teamName}  WHERE team_id= #{teamId} ; ",
            " UPDATE p_course_capacity            SET team_name=#{teamName}  WHERE team_id= #{teamId} ; ",
    })
    int updateDependent(Integer teamId,String teamName);
}
